package com.victor.entity.partner;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.victor.entity.partner.food.FoodMeal;
import com.victor.entity.partner.happy.HappyTheme;
import com.victor.entity.partner.hotel.HotelRoom;

import lombok.Data;

/**
 * 所有商家的账号
 * 
 * @author zhangbin
 *
 */
@Entity
@Table(name = "partner_user")
@Data
public class PartnerUser {

	/** 通用字段 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY) // 主键类型--自动递增生成
	@Column(name = "p_id", unique = true, nullable = false, length = 11)
	private Integer p_id;// 商家主键id

	@Column(name = "account", length = 50)
	private String account;// 账号

	@Column(name = "password", length = 50)
	private String password; // 密码
	
	@Column(name = "t_id", length = 50)
	private String t_id;//商户类别表id
	
	@Column(name = "type", length = 50)
	private String type;// 用户类型(1.酒店.2.美食. 3娱乐)

	@Column(name = "name", length = 50)
	private String name;// 商家名称

	@Column(name = "brand", length = 50)
	private String brand;// 商家品牌

	@Column(name = "introduce", length = 500)
	private String introduce;// 商家介绍

	@Column(name = "telphone", length = 50)
	private String telphone;// 商家电话

	@Column(name = "ifhomepage", length = 50)
	private String ifhomepage;// 是否为首页推荐 0否 1是

	@Column(name = "position", length = 50)
	private String position;// 位置--全

	@Column(name = "position_province", length = 50)
	private String position_province;// 位置--省

	@Column(name = "position_city", length = 50)
	private String position_city;// 位置--市

	@Column(name = "position_area", length = 50)
	private String position_area;// 位置--区

	@Column(name = "position_street", length = 50)
	private String position_street;// 位置--街道

	@Column(name = "position_detailed", length = 50)
	private String position_detailed;// 位置--详细

	@Column(name = "position_remarks", length = 500)
	private String position_remarks;// 位置备注

	@Column(name = "position_lon", length = 50)
	private String position_lon;// 位置经度

	@Column(name = "position_lat", length = 50)
	private String position_lat;// 位置纬度

	@Column(name = "adminid", length = 50)
	private String adminid; // 创建人id

	@Column(name = "frozen", length = 50, columnDefinition = "INT default 0")
	private String frozen;// 是否冻结标志 0.正常 1.冻结

	@Column(name = "frozen_starttime", length = 50)
	private String frozen_starttime;// 冻结起始时间

	@Column(name = "frozen_endtime", length = 50)
	private String frozen_endtime;// 冻结终止时间

	@Column(name = "frozen_cycle", length = 50)
	private String frozen_cycle;// 冻结周期 0.终身冻结 1.一小时, 2.一天, 3.一周, 4.一个月,5.一年,6.二年,7.三年,

	@Column(name = "frozen_title", length = 50)
	private String frozen_title;// 冻结原由标题

	@Column(name = "frozen_details", length = 50)
	private String frozen_details;// 冻结原由详情

	@Column(name = "cover_photo", length = 500)
	private String cover_photo; // 封面图

	@Column(name = "view360_photo", length = 50)
	private String view360_photo; // 360全景图

	@Column(name = "video", length = 50)
	private String video; // 视频

	@Column(name = "business_time", length = 50)
	private String business_time; // 营业时间----展示用字符串

	@Transient
	private PartnerType partnerType;// 类型

	@Transient
	private List<PartnerPhotoGroup> partnerPhotoGroups;// 多个图片组

	@Transient
	private List<PartnerCoupon> partnerCoupons;// 多个优惠券

	/** 自动计算 */
	@Column(name = "business_state", length = 50)
	private String business_state; // 营业状态（0营业中 1歇业中 2闭店）

	@Column(name = "business_time_mtof_start", length = 50)
	private String business_time_mtof_start; // 营业时间 --- 周一到周五 ---- 开始时间

	@Column(name = "business_time_mtof_end", length = 50)
	private String business_time_mtof_end; // 营业时间 --- 周一到周五 --- 结束时间

	@Column(name = "business_time_ss_start", length = 50)
	private String business_time_ss_start; // 营业时间 ---- 周六周日

	@Column(name = "business_time_ss_end", length = 50)
	private String business_time_ss_end; // 营业时间 ---- 周六周日

	/** 美食 */
	@Column(name = "f_theme", length = 50)
	private String f_theme;// 主题类别

	@Transient
	private List<FoodMeal> foodMeals;// 多个美食套餐

	/** 酒店 */
	@Column(name = "h_star", length = 50)
	private int h_star;// 星级

	@Column(name = "h_price", length = 50)
	private String h_price;// 价格

	@Transient
	private List<HotelRoom> hotelRooms;// 多个房间信息

	/** 娱乐 */
	@Column(name = "y_name", length = 50)
	private String y_name;// 名称

	@Column(name = "y_theme", length = 50)
	private String y_theme;// 主题

	@Transient
	private List<HappyTheme> happyThemes;// 多个娱乐项目

	/** 点赞评论转发数--通用 */
	@Transient
	private int praise_num;// 点赞数

	@Transient
	private int comment_num;// 评论数

	@Transient
	private int forward_num;// 转发数

	@Transient
	private int score;// 平均分
	
	@Transient
	private String juli;//app端显示距离

}
